home *** CD-ROM | disk | FTP | other *** search
Wrap
iiiillllMMMMeeeemmmmCCCCaaaacccchhhheeeeIIIImmmmgggg((((3333)))) IIIImmmmaaaaggggeeeeVVVViiiissssiiiioooonnnn LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll iiiillllMMMMeeeemmmmCCCCaaaacccchhhheeeeIIIImmmmgggg((((3333)))) NNNNAAAAMMMMEEEE iiiillllMMMMeeeemmmmCCCCaaaacccchhhheeeeIIIImmmmgggg - class to implement image data caching in main memory IIIINNNNHHHHEEEERRRRIIIITTTTSSSS FFFFRRRROOOOMMMM ilLink : ilImage : ilCacheImg HHHHEEEEAAAADDDDEEEERRRR FFFFIIIILLLLEEEE #include <il/ilMemCacheImg.h> CCCCLLLLAAAASSSSSSSS DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN ilMemCacheImg implements memory caching for two different types of image data: files and operators. For image files, the cache stores raw or uncompressed data. If the image is stored by rows, the cache is allocated by rows matching those in the file. If the files are stored in rectangular chunks, the cache is allocated in pieces that are the size and shape of the chunks. For image operators, the cache stores the processed results. A cache image stores its data in fixed-size rectangles called _p_a_g_e_s. A _t_i_l_e is an arbitrary rectangle of image data, which usually spans multiple pages. The image access functions (ggggeeeettttTTTTiiiilllleeee(((()))) and sssseeeettttTTTTiiiilllleeee(((()))) and their variants) allow arbitrary access to any contiguous rectangle of image data. Because these accesses usually do not match the underlying storage format, ilMemCacheImg performs any necessary reformatting of the image data. UUUUssssiiiinnnngggg iiiillllMMMMeeeemmmmCCCCaaaacccchhhheeeeIIIImmmmgggg Like ilImage, ilMemCacheImg is an abstract class, requiring further derivation to be used as an object. The virtuals inherited from ilImage, qqqqGGGGeeeettttTTTTiiiilllleeee3333DDDD(((()))) and qqqqSSSSeeeettttTTTTiiiilllleeee3333DDDD(((()))), along with qqqqFFFFiiiillllllllTTTTiiiilllleeee3333DDDD(((()))) and qqqqCCCCooooppppyyyyTTTTiiiilllleeeeCCCCffffgggg(((()))), are all implemented by this class. These functions provide the necessary conversion from the data pages in the cache to the user's tile requests. The virtual methods hhhhaaaassssPPPPaaaaggggeeeessss(((()))), qqqqLLLLoooocccckkkkPPPPaaaaggggeeeeSSSSeeeetttt(((()))) and uuuunnnnlllloooocccckkkkPPPPaaaaggggeeeeSSSSeeeetttt(((()))), inherited from ilImage, are also implemented by this class, hiding the ilImage implementations. qqqqLLLLoooocccckkkkPPPPaaaaggggeeeeSSSSeeeetttt(((()))) locks the specified pages in the cache and, if necessary, waits until the data is read into the cache. uuuunnnnlllloooocccckkkkPPPPaaaaggggeeeeSSSSeeeetttt(((()))) removes the lock on the specified pages (See also the iiiillllTTTTiiiilllleeeeIIIImmmmggggIIIItttteeeerrrr man page). PPPPaaaaggggeeee 1111 iiiillllMMMMeeeemmmmCCCCaaaacccchhhheeeeIIIImmmmgggg((((3333)))) IIIImmmmaaaaggggeeeeVVVViiiissssiiiioooonnnn LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll iiiillllMMMMeeeemmmmCCCCaaaacccchhhheeeeIIIImmmmgggg((((3333)))) hhhhaaaassssPPPPaaaaggggeeeessss(((()))) returns TRUE since this class uses the paging mechanism. Additionally, the virtuals ggggeeeettttCCCCaaaacccchhhheeeeSSSSiiiizzzzeeee(((()))) and fffflllluuuusssshhhh(((()))), inherited from ilCacheImg, are implemented by this class. ggggeeeettttCCCCaaaacccchhhheeeeSSSSiiiizzzzeeee(((()))) returns the cache (byte) size by multiplying the number of pages resident in cache times the object's page size. The fffflllluuuusssshhhh(((()))) function causes modified pages in cache to be written out from main memory to backing store, and optionally discards any resident pages. Most of the details of page management are implemented by the helper class, ilPager; see the man page for that class for more information on the paging scheme. DDDDeeeerrrriiiivvvviiiinnnngggg nnnneeeewwww iiiimmmmaaaaggggeeee ccccllllaaaasssssssseeeessss New image operators should derive from ilOpImg or one of its derived subclasses: ilMonadicImg, ilPolyadicImg, ilSpatialImg, ilWarpImg, and ilFPolyadicImg. Deriving from ilOpImg directly is more complicated than deriving from one of it's descendants; try to find a suitable subclass of ilOpImg to derive from if possible. Image file classes should be derived using the IFL (Image Format Library); see the IFL man page for more information. Such derived classes can be accessed within the IL using ilFileImg. PPPPaaaaggggeeee rrrreeeeqqqquuuueeeesssstttt pppprrrroooocccceeeessssssssiiiinnnngggg If you derive directly from ilMemCacheImg (or ilOpImg), you need to be aware of the details of how image data requests are processed through the multi-processing scheme defined by the ilMpManager and ilMpRequest classes. When a tile is referenced by a call to a data access method of an ilMemCacheImg object, the set of pages that the tile overlaps is looked up in the cache; if a page is resident it is simply reused. For each non-resident page, an ilMpCacheRequest is issued to bring that page into the cache. These requests may be processed concurrently on multi- processor machines. Each cache page request passes through three phases of execution. A phase is represented by a virtual method (whose only argument is the request object,) which performs one of these actions: _p_r_e_p_a_r_e In this initial phase any input data that is needed by the page being processed is read in. Typically this will be done either by using qqqqLLLLoooocccckkkkPPPPaaaaggggeeeeSSSSeeeetttt() or qqqqGGGGeeeettttSSSSuuuubbbbTTTTiiiilllleeee3333DDDD() on the input image(s) of an operator. The asynchronous versions of these operations must be used so that the IL can prepare ahead of what it needs. This allows accesses to disk to be queued up before they are needed to improve processing performance. The request being prepared must be used as the parent node of any asynchronous methods called in this phase; this relationship prevents the parent request from advancing to the next phase until all child requests are completed. When qqqqGGGGeeeettttSSSSuuuubbbbTTTTiiiilllleeee3333DDDD() is called, an input data buffer must be PPPPaaaaggggeeee 2222 iiiillllMMMMeeeemmmmCCCCaaaacccchhhheeeeIIIImmmmgggg((((3333)))) IIIImmmmaaaaggggeeeeVVVViiiissssiiiioooonnnn LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll iiiillllMMMMeeeemmmmCCCCaaaacccchhhheeeeIIIImmmmgggg((((3333)))) allocated. You can either provide one or let the call do it for you by passing a data pointer that is initialized to NULL (see ilImage(3) for more details). All data buffer pointers must be stored in the request structure, not in the image object itself, to allow for concurrent page processing. To implement this phase for a derived class you override the definition of the pppprrrreeeeppppaaaarrrreeeeRRRReeeeqqqquuuueeeesssstttt() virtual. Each request invokes that method as it enters the prepare phase; if a request is aborted, however, it might not actually perform this phase. By default the page's data are not allocated when pppprrrreeeeppppaaaarrrreeeeRRRReeeeqqqquuuueeeesssstttt() is called; the allocation is deferred to just before the call to eeeexxxxeeeeccccuuuutttteeeeRRRReeeeqqqquuuueeeesssstttt(). If the page data is needed at prepare time you will need to call sssseeeettttPPPPaaaaggggeeeeAAAAllllllllooooccccTTTTiiiimmmmeeee() either in the derived class's constructor or rrrreeeesssseeeetttt() (or rrrreeeesssseeeettttOOOOpppp()) method. _e_x_e_c_u_t_e A request enters this phase after all child requests (created in the prepare phase) are completed. It implements the actual computation for derived operator classes. To implement this phase for a derived class you override the definition of the eeeexxxxeeeeccccuuuutttteeeeRRRReeeeqqqquuuueeeesssstttt() virtual. Each request invokes that method as it enters the execute phase; if a request is aborted, however, it might not actually execute phase. To obtain a pointer to the page that is to be filled in, your virtual will call the request's ggggeeeettttDDDDaaaattttaaaa() method. _f_i_n_i_s_h This phase is entered for each request in one of two ways: either after the execution phase is complete or for requests that get past the prepare phase but are aborted before reaching the execution phase. This phase is responsible for cleaning up all resources allocated during the prepare phase; this might include memory allocated for data buffers or pages that were locked in input cache images. To implement this phase for a derived class you override the definition of the ffffiiiinnnniiiisssshhhhRRRReeeeqqqquuuueeeesssstttt() virtual. Each request invokes that method as it enters the finish phase; all requests will perform the finish phase, whether or not they complete successfully. The virtuals that implement these phases must return an iiiillllSSSSttttaaaattttuuuussss value, which may be a ilOKAY, ilPARKED, or an error status. If ilOKAY is returned, then the phase completed successfully, and this request may advance to the next phase (after all child requests are completed, if any were created). PPPPaaaaggggeeee 3333 iiiillllMMMMeeeemmmmCCCCaaaacccchhhheeeeIIIImmmmgggg((((3333)))) IIIImmmmaaaaggggeeeeVVVViiiissssiiiioooonnnn LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll iiiillllMMMMeeeemmmmCCCCaaaacccchhhheeeeIIIImmmmgggg((((3333)))) If ilPARKED is returned, then this request has been parked, presumably to wait for a resource; the resource manager is then responsible for unparking this request when that resource becomes available to it. If any other status is returned, the request is presumed to have failed, and it will be advanced directly to the finish phase. If this request is a child, then the status value will also be propagated to the parent request. The virtual ggggeeeettttMMMMppppRRRReeeeqqqquuuueeeesssstttt() creates a request structure, which is passed as the only argument to the processing virtuals described above. This virtual can be re-defined by derived classes so that they can derive a new class from ilMpCacheRequest; objects of the derived type will then be passed to the request processing phases. This is typically used to add members to ilMpCacheRequest to hold pointers to any data buffers allocated in pppprrrreeeeppppaaaarrrreeeeRRRReeeeqqqquuuueeeesssstttt(((()))). One example of a class derived from ilMpCacheRequest is in <il/ilMonadicImg.h>, where ilMpMonadicRequest is defined. BBBBaaaacccckkkkiiiinnnngggg ssssttttoooorrrreeee The virtuals ggggeeeettttPPPPaaaaggggeeee() and sssseeeettttPPPPaaaaggggeeee() should only be defined for file images; operator images should not define them. These two virtuals are implemented by ilFileImg. The ggggeeeettttPPPPaaaaggggeeee() virtual is only called if a request in the prepare phase sets its next phase to be _i_l_M_p_R_e_a_d (by calling sssseeeettttNNNNeeeexxxxttttSSSSttttaaaatttteeee(), defined on ilMpRequest). It should read data from the backing store or image file and place it in the page. The sssseeeettttPPPPaaaaggggeeee() virtual is called (when the cache is flushed) once for each page that has been marked dirty (as a result of being written to by calls to sssseeeettttTTTTiiiilllleeee(), ccccooooppppyyyyTTTTiiiilllleeee() or ffffiiiillllllllTTTTiiiilllleeee()). This method should write the data in the page out to the backing store or image file. Operator images can use sssseeeettttRRRReeeettttaaaaiiiinnnnMMMMooooddddeeee() to retain computed pages in a temporary file. Any temporary file is automatically removed when the operator is reset or deleted. Use sssseeeettttRRRReeeettttaaaaiiiinnnnPPPPaaaatttthhhh() to control the directory in which temporary backing store files are created. MMMMoooonnnniiiittttoooorrrriiiinnnngggg tttthhhheeee ccccaaaacccchhhheeee You can watch for cache thrashing (wasted re-calculation of the same page) if you enable monitoring with either sssseeeettttGGGGlllloooobbbbaaaallllTTTThhhhrrrraaaasssshhhhMMMMooooddddeeee() or sssseeeettttTTTThhhhrrrraaaasssshhhhMMMMooooddddeeee(). You can get the time spent thrashing with ggggeeeettttTTTThhhhrrrraaaasssshhhhTTTTiiiimmmmeeee(). The average time spent computing a page can be obtained with ggggeeeettttPPPPaaaaggggeeeeTTTTiiiimmmmeeee() while the total time spent computing pages for an image is returned with ggggeeeettttTTTToooottttaaaallllPPPPaaaaggggeeeeTTTTiiiimmmmeeee(). PPPPaaaaggggeeee 4444 iiiillllMMMMeeeemmmmCCCCaaaacccchhhheeeeIIIImmmmgggg((((3333)))) IIIImmmmaaaaggggeeeeVVVViiiissssiiiioooonnnn LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll iiiillllMMMMeeeemmmmCCCCaaaacccchhhheeeeIIIImmmmgggg((((3333)))) CCCCoooonnnnttttrrrroooolllllllliiiinnnngggg tttthhhheeee ccccaaaacccchhhheeee Various functions inherited from ilImage (for example, ggggeeeettttPPPPaaaaggggeeeeSSSSiiiizzzzeeee(((()))), sssseeeettttPPPPaaaaggggeeeeSSSSiiiizzzzeeee(((())))), and the global routines, iiiillllSSSSeeeettttMMMMaaaaxxxxCCCCaaaacccchhhheeeeSSSSiiiizzzzeeee(((()))), iiiillllSSSSeeeettttMMMMaaaaxxxxCCCCaaaacccchhhheeeeFFFFrrrraaaaccccttttiiiioooonnnn(((()))), iiiillllGGGGeeeettttMMMMaaaaxxxxCCCCaaaacccchhhheeeeSSSSiiiizzzzeeee(((()))), iiiillllGGGGeeeettttCCCCuuuurrrrCCCCaaaacccchhhheeeeSSSSiiiizzzzeeee(((()))), iiiillllGGGGeeeettttMMMMaaaaxxxxCCCCaaaacccchhhheeeeFFFFrrrraaaaccccttttiiiioooonnnn(((()))), can be used to control the operation of the cache. CCCCLLLLAAAASSSSSSSS MMMMEEEEMMMMBBBBEEEERRRR FFFFUUUUNNNNCCCCTTTTIIIIOOOONNNN SSSSUUUUMMMMMMMMAAAARRRRYYYY CCCCoooonnnnttttrrrroooolllllllliiiinnnngggg MMMMuuuullllttttiiii----TTTThhhhrrrreeeeaaaaddddiiiinnnngggg void enableMP(int on=TRUE) int isMPenabled() PPPPaaaaggggeeee ttttiiiimmmmiiiinnnngggg float getPageTime() float getTotalPageTime() void setRetainMode(ilCacheRetainMode mode) ilCacheRetainMode getRetainMode() void setThrashMode(ilCacheThrashMode mode) ilCacheThrashMode getThrashMode() float getThrashTime() static void setGlobalThrashMode(ilCacheThrashMode mode) static ilCacheThrashMode getGlobalThrashMode() static void setRetainPath(const char* path) static const char* getRetainPath() RRRReeeeqqqquuuueeeesssstttt pppprrrroooocccceeeessssssssiiiinnnngggg virtual ilMpCacheRequest* getMpRequest(ilMpManager* parent, int x, int y, int z, int c, int mode=ilLMread) _p_r_o_t_e_c_t_e_d virtual ilStatus prepareRequest(ilMpCacheRequest* req) _p_r_o_t_e_c_t_e_d virtual ilStatus executeRequest(ilMpCacheRequest* req) _p_r_o_t_e_c_t_e_d virtual ilStatus finishRequest(ilMpCacheRequest* req) _p_r_o_t_e_c_t_e_d virtual ilStatus getPage(ilMpCacheRequest* req) _p_r_o_t_e_c_t_e_d virtual ilStatus setPage(ilMpCacheRequest* req) _p_r_o_t_e_c_t_e_d MMMMeeeemmmmoooorrrryyyy mmmmaaaannnnaaaaggggeeeemmmmeeeennnntttt void doUserPageAlloc() _p_r_o_t_e_c_t_e_d int isUserPageAlloc() _p_r_o_t_e_c_t_e_d virtual void* allocPage(int x, int y, int z, int c) _p_r_o_t_e_c_t_e_d virtual void freePage(void* data) _p_r_o_t_e_c_t_e_d void setPageAllocTime(AllocTime when) _p_r_o_t_e_c_t_e_d AllocTime getPageAllocTime() _p_r_o_t_e_c_t_e_d PPPPaaaaggggeeee 5555 iiiillllMMMMeeeemmmmCCCCaaaacccchhhheeeeIIIImmmmgggg((((3333)))) IIIImmmmaaaaggggeeeeVVVViiiissssiiiioooonnnn LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll iiiillllMMMMeeeemmmmCCCCaaaacccchhhheeeeIIIImmmmgggg((((3333)))) FFFFUUUUNNNNCCCCTTTTIIIIOOOONNNN DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNNSSSS aaaallllllllooooccccPPPPaaaaggggeeee(((()))) virtual void* allocPage(int x, int y, int z, int c) _p_r_o_t_e_c_t_e_d This virtual function is used to allocate a page from memory. It's called internally only if the ddddooooUUUUsssseeeerrrrPPPPaaaaggggeeeeAAAAlllllllloooocccc(((()))) was previously invoked. ddddooooUUUUsssseeeerrrrPPPPaaaaggggeeeeAAAAlllllllloooocccc(((()))) void doUserPageAlloc() _p_r_o_t_e_c_t_e_d This function can be used to enable user-defined page allocation scheme. Once this function is invoked, ImageVision Library will invoke the aaaallllllllooooccccPPPPaaaaggggeeee(((()))) and ffffrrrreeeeeeeePPPPaaaaggggeeee(((()))) functions whenever a page of data needs to be allocated or freed respectively. eeeennnnaaaabbbblllleeeeMMMMPPPP(((()))) void enableMP(int on=TRUE) This function can be used to enable or diasable multi-threading of the processing requests for this object. If the _o_n parameter is TRUE, multi-threading will be enabled, otherwise it will be disabled. eeeexxxxeeeeccccuuuutttteeeeRRRReeeeqqqquuuueeeesssstttt(((()))) virtual ilStatus executeRequest(ilMpCacheRequest* req) _p_r_o_t_e_c_t_e_d This virtual should be re-defined by derived classes to compute the requested page; this method is only invoked after all requests generated by the prior call to pppprrrreeeeppppaaaarrrreeeeRRRReeeeqqqquuuueeeesssstttt() for _r_e_q have been completed. ffffiiiinnnniiiisssshhhhRRRReeeeqqqquuuueeeesssstttt(((()))) virtual ilStatus finishRequest(ilMpCacheRequest* req) _p_r_o_t_e_c_t_e_d This virtual can be re-defined by derived classes to free any resources allocated in the prior call to pppprrrreeeeppppaaaarrrreeeeRRRReeeeqqqquuuueeeesssstttt() for _r_e_q, and perform any other per-request cleanup. This may involve unlocking input pages or freeing allocated data buffers. The default implementation does nothing. PPPPaaaaggggeeee 6666 iiiillllMMMMeeeemmmmCCCCaaaacccchhhheeeeIIIImmmmgggg((((3333)))) IIIImmmmaaaaggggeeeeVVVViiiissssiiiioooonnnn LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll iiiillllMMMMeeeemmmmCCCCaaaacccchhhheeeeIIIImmmmgggg((((3333)))) ffffrrrreeeeeeeePPPPaaaaggggeeee(((()))) virtual void freePage(void* data) _p_r_o_t_e_c_t_e_d This virtual function is used to deallocate a page from memory. It's called internally only if the ddddooooUUUUsssseeeerrrrPPPPaaaaggggeeeeAAAAlllllllloooocccc(((()))) was previously invoked. ggggeeeettttGGGGlllloooobbbbaaaallllTTTThhhhrrrraaaasssshhhhMMMMooooddddeeee(((()))) static ilCacheThrashMode getGlobalThrashMode() This static method returns the thrash mode set with sssseeeettttGGGGlllloooobbbbaaaallllTTTThhhhrrrraaaasssshhhhMMMMooooddddeeee(). ggggeeeettttMMMMppppRRRReeeeqqqquuuueeeesssstttt(((()))) virtual ilMpCacheRequest* getMpRequest(ilMpManager* parent, int x, int y, int z, int c, int mode=ilLMread) _p_r_o_t_e_c_t_e_d This virtual can be redefined in a derived class to change the type of request structure that is to be created to handle processing of each page for this image. The request structure returned must be derived from ilMpCacheRequest. The default implementation is: return new ilMpCacheRequest(parent, x, y, z, c, mode); A typical derived implementation would look the same except for using a class derived from ilMpCacheRequest in its stead. ggggeeeettttPPPPaaaaggggeeee(((()))) virtual ilStatus getPage(ilMpCacheRequest* req) _p_r_o_t_e_c_t_e_d This method is redefined in the derived ilFileImg class to read a page of data from a disk tile. Currently this is method is not useable by other derived classes. ggggeeeettttPPPPaaaaggggeeeeAAAAllllllllooooccccTTTTiiiimmmmeeee(((()))) AllocTime getPageAllocTime() _p_r_o_t_e_c_t_e_d Returns the current setting for the page allocation time; i.e. when the page's data should be allocated: prepare time or execute time. The default setting is at execute time. PPPPaaaaggggeeee 7777 iiiillllMMMMeeeemmmmCCCCaaaacccchhhheeeeIIIImmmmgggg((((3333)))) IIIImmmmaaaaggggeeeeVVVViiiissssiiiioooonnnn LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll iiiillllMMMMeeeemmmmCCCCaaaacccchhhheeeeIIIImmmmgggg((((3333)))) ggggeeeettttPPPPaaaaggggeeeeTTTTiiiimmmmeeee(((()))) float getPageTime() Thie method returs the average time to compute a page in the cache (includes time to computing parent image pages). ggggeeeettttRRRReeeettttaaaaiiiinnnnMMMMooooddddeeee(((()))) ilCacheRetainMode getRetainMode() The method returns the page retention mode as set by sssseeeettttRRRReeeettttaaaaiiiinnnnMMMMooooddddeeee(). ggggeeeettttRRRReeeettttaaaaiiiinnnnPPPPaaaatttthhhh(((()))) static const char* getRetainPath() This static method returns the directory path to be used for temporary files that hold retainted pages as set by sssseeeettttRRRReeeettttaaaaiiiinnnnPPPPaaaatttthhhh(). ggggeeeettttTTTThhhhrrrraaaasssshhhhMMMMooooddddeeee(((()))) ilCacheThrashMode getThrashMode() This method returns the thrash mode set with sssseeeettttTTTThhhhrrrraaaasssshhhhMMMMooooddddeeee() or sssseeeettttGGGGlllloooobbbbaaaallllTTTThhhhrrrraaaasssshhhhMMMMooooddddeeee(). ggggeeeettttTTTThhhhrrrraaaasssshhhhTTTTiiiimmmmeeee(((()))) float getThrashTime() This method returns the total time spent redundantly re-computing or re-loading pages for this image (since the last reset) as as result of cache thrashing. This info is only available if enabled with sssseeeettttTTTThhhhrrrraaaasssshhhhMMMMooooddddeeee() or sssseeeettttGGGGlllloooobbbbaaaallllTTTThhhhrrrraaaasssshhhhMMMMooooddddeeee(). ggggeeeettttTTTToooottttaaaallllPPPPaaaaggggeeeeTTTTiiiimmmmeeee(((()))) float getTotalPageTime() This method returns the total time spent computing or loading pages for this image (since the last reset). PPPPaaaaggggeeee 8888 iiiillllMMMMeeeemmmmCCCCaaaacccchhhheeeeIIIImmmmgggg((((3333)))) IIIImmmmaaaaggggeeeeVVVViiiissssiiiioooonnnn LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll iiiillllMMMMeeeemmmmCCCCaaaacccchhhheeeeIIIImmmmgggg((((3333)))) iiiissssMMMMPPPPeeeennnnaaaabbbblllleeeedddd(((()))) int isMPenabled() This function can be used to determine if multi-threading of the page requests for this object is enabled. If the returned value is TRUE, multi-threading is enabled, otherwise it is disabled. iiiissssUUUUsssseeeerrrrPPPPaaaaggggeeeeAAAAlllllllloooocccc(((()))) int isUserPageAlloc() _p_r_o_t_e_c_t_e_d This function can be used to determine is the user-defined aaaallllllllooooccccPPPPaaaaggggeeee(((()))) is used for page allocation. If the returned value is TRUE, aaaallllllllooooccccPPPPaaaaggggeeee(((()))) is used, otherwise the default implementation for page allocation is used. pppprrrreeeeppppaaaarrrreeeeRRRReeeeqqqquuuueeeesssstttt(((()))) virtual ilStatus prepareRequest(ilMpCacheRequest* req) _p_r_o_t_e_c_t_e_d This virtual can be re-defined by derived classes to issue requests for any input data that is required in order to compute the requested output page. The default implementation assumes no requests need to be issued for input data (this might be the case in an operator that synthesizes its data). sssseeeettttGGGGlllloooobbbbaaaallllTTTThhhhrrrraaaasssshhhhMMMMooooddddeeee(((()))) static void setGlobalThrashMode(ilCacheThrashMode mode) This static method sets the global thrash mode. The value is applied to all existing objects derived from ilMemCacheImg and any such objects created in the future. The mode can have one of the two following values: ilCacheThrashIgnore Don't do anything special, just ignore thrashing. This is the default mode. ilCacheThrashMonitor Keep track of which pages have been computed since reset, watching for pages that get redundantly loaded into cache. The wasted time spent processing pages more than once can be returned with the ggggeeeettttTTTThhhhrrrraaaasssshhhhTTTTiiiimmmmeeee() method when this mode is set. PPPPaaaaggggeeee 9999 iiiillllMMMMeeeemmmmCCCCaaaacccchhhheeeeIIIImmmmgggg((((3333)))) IIIImmmmaaaaggggeeeeVVVViiiissssiiiioooonnnn LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll iiiillllMMMMeeeemmmmCCCCaaaacccchhhheeeeIIIImmmmgggg((((3333)))) sssseeeettttPPPPaaaaggggeeee(((()))) virtual ilStatus setPage(ilMpCacheRequest* req) _p_r_o_t_e_c_t_e_d This method is redefined in the derived ilFileImg class to write a page of data to a disk tile. Currently this is method is not useable by other derived classes. sssseeeettttPPPPaaaaggggeeeeAAAAllllllllooooccccTTTTiiiimmmmeeee(((()))) void setPageAllocTime(AllocTime when) _p_r_o_t_e_c_t_e_d Sets the page allocation time; i.e. when a page's data should be allocated: prepare time (_i_l_P_a_g_e_A_l_l_o_c_A_t_P_r_e_p_a_r_e) or execute time (_i_l_P_a_g_e_A_l_l_o_c_A_t_C_o_m_p_u_t_e). The default setting is at execute time. sssseeeettttRRRReeeettttaaaaiiiinnnnMMMMooooddddeeee(((()))) void setRetainMode(ilCacheRetainMode mode) This method sets the page retention mode. The mode can have one of the two following values: ilCacheRetainOff Don't save unmodified cache pages when they must be discarded because the cache is full. This is the default mode. ilCacheRetainOn Keep pages for this image in a temporary file when they must be removed from the cache because the cache is full. These pages will be read from the temporary file rather than being recomputed if they are needed again later. sssseeeettttRRRReeeettttaaaaiiiinnnnPPPPaaaatttthhhh(((()))) static void setRetainPath(const char* path) This static method sets the directory path to be used for temporary files that hold retainted pages when enabled with sssseeeettttRRRReeeettttaaaaiiiinnnnMMMMooooddddeeee(). The default value is as described for tttteeeemmmmppppnnnnaaaammmm(3S) sssseeeettttTTTThhhhrrrraaaasssshhhhMMMMooooddddeeee(((()))) void setThrashMode(ilCacheThrashMode mode) This method sets the thrash mode for this object. The thrash mode can have one of the values described in sssseeeettttGGGGlllloooobbbbaaaallllTTTThhhhrrrraaaasssshhhhMMMMooooddddeeee(). PPPPaaaaggggeeee 11110000 iiiillllMMMMeeeemmmmCCCCaaaacccchhhheeeeIIIImmmmgggg((((3333)))) IIIImmmmaaaaggggeeeeVVVViiiissssiiiioooonnnn LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll iiiillllMMMMeeeemmmmCCCCaaaacccchhhheeeeIIIImmmmgggg((((3333)))) IIIINNNNHHHHEEEERRRRIIIITTTTEEEEDDDD MMMMEEEEMMMMBBBBEEEERRRR FFFFUUUUNNNNCCCCTTTTIIIIOOOONNNNSSSS IIIInnnnhhhheeeerrrriiiitttteeeedddd ffffrrrroooommmm iiiillllCCCCaaaacccchhhheeeeIIIImmmmgggg enablePagingCallback(), flush(), getCacheSize(), isPagingCallbackEnabled(), listResident() IIIInnnnhhhheeeerrrriiiitttteeeedddd ffffrrrroooommmm iiiillllIIIImmmmaaaaggggeeee addInput(), allocFillData(), checkColorModel(), checkValidOrder(), checkValidType(), clipTile(), configureRetainedCache(), copy(), copyTile(), copyTile3D(), copyTileCfg(), fillTile(), fillTile3D(), fillTileRGB(), freeFillData(), getColorImg(), getColorModel(), getColormap(), getCompression(), getConfig(), getCopyConverter(), getCsize(), getDataType(), getDimensions(), getDirectInput(), getDisplayCacheEnable(), getFill(), getFillData(), getFillValue(), getHeight(), getHwEnable(), getHwHint(), getHwIntHint(), getHwOp(), getHwPassTable(), getInput(), getInputTileRequirement(), getLockTileSet(), getMaxColormapLevels(), getMaxValue(), getMinValue(), getNumChans(), getNumInputs(), getOrder(), getOrientation(), getPageBorder(), getPageBorderX(), getPageBorderY(), getPageBorderZ(), getPageCounts(), getPageDelta(), getPageDimensions(), getPageIndices(), getPageOrigin(), getPageOriginC(), getPageOriginX(), getPageOriginY(), getPageOriginZ(), getPageSize(), getPageSizeC(), getPageSizePix(), getPageSizeVal(), getPageSizeX(), getPageSizeY(), getPageSizeZ(), getPixel(), getPixel3D(), getPriority(), getScaleMax(), getScaleMin(), getSize(), getStrides(), getSubTile(), getSubTile3D(), getTile(), getTile3D(), getWidth(), getXsize(), getYsize(), getZsize(), hasPageBorder(), hasPages(), hwDefine(), hwGetPass(), inherit(), initColorModel(), initHwEnable(), initMinMax(), initPageSize(), initScaleMinMax(), isColorImg(), isIntegral(), isMirrorOrientation(), isPartialPage(), isSigned(), isValidPage(), isWritable(), lockPage(), lockPageSet(), lockTile(), lockTile3D(), mapFlipTrans(), mapFromInput(), mapFromSource(), mapOrientation(), mapSize(), mapTile(), mapToInput(), mapToSource(), mapXY(), mapXYSign(), outOfBound(), qCopyTileCfg(), qFillTile3D(), qFillTileRGB(), qGetSubTile3D(), qGetTile3D(), qLockPageSet(), qSetSubTile3D(), qSetTile3D(), removeHwHint(), removeInput(), reset(), setColorModel(), setColormap(), setCompression(), setCsize(), setDataType(), setDisplayCacheEnable(), setFill(), setFillValue(), setHwEnable(), setHwHint(), setHwIntHint(), setInput(), setMaxColormapLevels(), setMaxValue(), setMinValue(), setNumChans(), setNumInputs(), setOrder(), setOrientation(), setPageBorder(), setPageSize(), setPageSizeC(), setPageSizeZ(), setPixel(), setPixel3D(), setPriority(), setScaleMinMax(), setScaleType(), setSize(), setSubTile(), setSubTile3D(), setTile(), setTile3D(), setTileRequirementFunction(), setWritable(), setXsize(), setYsize(), setZsize(), unlockPage(), unlockPageSet() IIIInnnnhhhheeeerrrriiiitttteeeedddd ffffrrrroooommmm iiiillllLLLLiiiinnnnkkkk addResetCallback(), alterAction(), anyAltered(), clearAllowed(), clearSet(), clearStatus(), deleteRelated(), disableAltered(), dumpChain(), getClassPropSet(), getDescription(), getDirectParent(), getDisabledIndex(), getFloatProp(), getGenerationID(), getIntProp(), getMaxIndex(), getMinIndex(), getNumChildren(), getNumParents(), getParent(), getProp(), getProp(), getPropSet(), getPtrProp(), PPPPaaaaggggeeee 11111111 iiiillllMMMMeeeemmmmCCCCaaaacccchhhheeeeIIIImmmmgggg((((3333)))) IIIImmmmaaaaggggeeeeVVVViiiissssiiiioooonnnn LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll iiiillllMMMMeeeemmmmCCCCaaaacccchhhheeeeIIIImmmmgggg((((3333)))) getRelatedChild(), getRelatedDelete(), getRelatedType(), getStatus(), hasResetCallbacks(), ilGetClassPropSet(), inProgress(), isAllowed(), isAltered(), isEnabled(), isRelated(), isSet(), markSet(), mpUnlock(), neverReset(), newRelatedType(), removeParent(), removeProp(), removeResetCallback(), reset(), resetAltered(), resetCheck(), setAllowed(), setAltered(), setDescription(), setDisabledIndex(), setEnabled(), setParent(), setProp(), setPropAltered(), setRelatedDelete(), setRelatedType(), setStatus(), stopWatching(), unalterable(), watch(), watchNotify() SSSSEEEEEEEE AAAALLLLSSSSOOOO ilImage(3), ilCacheImg(3), ilFileImg(3), ilMondadicImg(3), ilPolyadi- cImg(3), ilSpatialImg(3), ilWarpImg(3), ilFPolyadicImg(3), ilTileIm- gIter(3) PPPPaaaaggggeeee 11112222